﻿@model Vms.Web.Models.NavigationLinksViewModel
@{
    Layout = null;
    //string currentAction = ViewContext.ParentActionViewContext.RouteData.GetRequiredString("action").ToLower();
    string currentController = ViewContext.ParentActionViewContext.RouteData.GetRequiredString("controller").ToLower();

}

<ul class="nav">
@foreach (var navigationLink in Model.NavigationLinks)
{
    if (navigationLink.ControllerName.ToLower().Contains(currentController))
    {
        <li class="active">@Html.ActionLink(navigationLink.LinkText, navigationLink.ActionName, navigationLink.ControllerName)</li>
    } else
    {
        <li>@Html.ActionLink(navigationLink.LinkText, navigationLink.ActionName, navigationLink.ControllerName)</li>
    }
}
</ul>

